<template>
  <header class="app-header">
    <div class="header-left">
      <div class="logo">
        <el-icon><DataAnalysis /></el-icon>
        <span class="logo-text">招聘数据可视化分析系统</span>
      </div>
    </div>

    <nav class="header-nav">
      <router-link
        v-for="item in navItems"
        :key="item.path"
        :to="item.path"
        class="nav-item"
        active-class="active"
      >
        <el-icon><component :is="item.icon" /></el-icon>
        <span>{{ item.title }}</span>
      </router-link>
    </nav>

    <div class="header-right">
      <!-- 可以添加用户信息等 -->
    </div>
  </header>
</template>

<script setup>
import { DataAnalysis, Monitor, TrendCharts, User, ChatDotRound } from '@element-plus/icons-vue'

const navItems = [
  { path: '/dashboard', title: '数据概览', icon: 'Monitor' },
  { path: '/salary-analysis', title: '薪资分析', icon: 'TrendCharts' },
  { path: '/job-profile', title: '岗位画像', icon: 'User' },
  { path: '/ai-assistant', title: 'AI助手', icon: 'ChatDotRound' }
]
</script>

<style scoped>
.app-header {
  height: 60px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.logo-text {
  margin-left: 8px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  color: var(--text-color);
  transition: all var(--transition-fast);
  gap: 6px;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--primary);
}

.nav-item.active {
  background-color: var(--primary);
  color: #ffffff;
}

.header-right {
  min-width: 100px;
}
</style>

